<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:composition template="/layout/maintemplate.xhtml">
		<ui:define name="maincontent">
		<h:messages />
			<h:form id="addStorageContainerForm">
				<h:panelGrid columns="3">
					<h:outputLabel id="nameLabel" for="nameInput" value="#{messages.name}:" />
					<h:inputText id="nameInput" value="#{addStorageContainerBean.name}" required="true" requiredMessage="#{messages.input_required}" />
					<h:message id="nameMsg" for="nameInput" />
					
					<h:outputLabel id="sizeLabel" for="sizeInput" value="#{messages.sizeInMb}:" />
					<p:spinner id="sizeInput" value="#{addStorageContainerBean.sizeInMb}" required="true" requiredMessage="#{messages.input_required}"
						min="0" stepFactor="100" />
					<h:message id="sizeMsg" for="sizeInput" />
				</h:panelGrid>
				
				<ui:include src="/templates/inc_metadatavalueselection.xhtml">
					<ui:param name="metadataSelectionTableId" value="metadataSelect" />
					<ui:param name="metadataSelectionTableModel" value="#{addStorageContainerBean.metadataSelectionModel}" />
					<ui:param name="addMetadataModalDialogWidgetVar" value="mdefInputDialog" />
				</ui:include>
				
				<h:commandButton id="addStorageContainerInputButton" value="#{messages.save}" action="#{addStorageContainerBean.saveStorageContainer}" />
			</h:form>
			
			<ui:include src="/templates/inc_addmetadatadefinitionmodaldialog.xhtml">
				<ui:param name="embeddedMetadataValueInputBeanSubClass" value="#{addStorageContainerBean}" />
				<ui:param name="modalDialogWidgetVar" value="mdefInputDialog" />
				<ui:param name="outerIdsToUpdate" value=":addStorageContainerForm:metadataSelect" />
			</ui:include>
			
		</ui:define>
	</ui:composition>

</html>